﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="QuanLyQuyen.ascx.cs" Inherits="Solutions.Admin.QuanLyQuyen.QuanLyQuyen1" %>
<dx:ASPxButton runat="server" Text="Thêm mới" ID="IdThemMoiQuyen" EncodeHtml="False" OnClick="bt_themmoi" AutoPostBack="False" >
    <Image Url="../Skins/style/IMG/icon/Add.png" Width="16px" Height="16px" />
</dx:ASPxButton>

   <dx:ASPxGridView ID="grdTest" runat="server" Width="100%" OnRowCommand="grdTest_RowCommand" Caption="Danh sách quyền" AutoGenerateColumns="False" EnableTheming="True" Theme="Aqua"
        KeyFieldName="pk_iQuyenID">
        <Columns>
            <dx:GridViewDataTextColumn Caption="STT" VisibleIndex="0" Width="40"  >
                <DataItemTemplate>
                    <%#Container.ItemIndex +1 %>
                </DataItemTemplate>
            </dx:GridViewDataTextColumn>
           
            <dx:GridViewDataTextColumn FieldName="sMaQuyen" Width="200" Caption="Mã quyền" VisibleIndex="1"  HeaderStyle-Font-Bold="True" HeaderStyle-HorizontalAlign="Center"  />
            <dx:GridViewDataTextColumn FieldName="sTenQuyen" Width="100" Caption="Tên quyền" VisibleIndex="2" HeaderStyle-HorizontalAlign="Center"  HeaderStyle-Font-Bold="True"  />
            <dx:GridViewDataTextColumn FieldName="sTenMenu" Width="100" Caption="Menu" VisibleIndex="2"  HeaderStyle-HorizontalAlign="Center"  HeaderStyle-Font-Bold="True" />
            <dx:GridViewDataTextColumn FieldName="sTenTaiNguyen" Width="100" Caption="Tài nguyên" VisibleIndex="2" HeaderStyle-HorizontalAlign="Center"   HeaderStyle-Font-Bold="True"/>
            <dx:GridViewDataTextColumn FieldName="sThaoTac" Width="100" Caption="Thao tác" VisibleIndex="2" HeaderStyle-HorizontalAlign="Center"  HeaderStyle-Font-Bold="True" />
            <dx:GridViewDataTextColumn FieldName="dNgayCapNhat" Width="100" Caption="Ngày cập nhật" VisibleIndex="2" HeaderStyle-HorizontalAlign="Center"  HeaderStyle-Font-Bold="True"  />
           
            <dx:GridViewDataTextColumn Caption="Edit" VisibleIndex="3" Width="40px" HeaderStyle-HorizontalAlign="Center"  HeaderStyle-Font-Bold="True" CellStyle-HorizontalAlign="Center">
                <DataItemTemplate>
                    <asp:ImageButton ID="imbEdit" runat="server"
                        CommandName="Edit"
                        ImageUrl="../Skins/style/IMG/icon/Edit.png" ClientIDMode="Static" />
                </DataItemTemplate>
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Delete" VisibleIndex="4" Width="40px" HeaderStyle-HorizontalAlign="Center"  HeaderStyle-Font-Bold="True" CellStyle-HorizontalAlign="Center">
                <DataItemTemplate>
                    <asp:ImageButton ID="imbEdit" runat="server"
                        CommandName="Delete"
                        ImageUrl="../Skins/style/IMG/icon/Delete.png" ClientIDMode="Static" />
                </DataItemTemplate>
            </dx:GridViewDataTextColumn>
        </Columns>
       <Styles>
        <AlternatingRow Enabled="true" />
    </Styles>
    <SettingsBehavior AllowSelectByRowClick="true" />
    <Settings VerticalScrollableHeight="430" ShowFilterRow="true" />
    <SettingsPager Position="Bottom" PageSize="20">
        <PageSizeItemSettings Items="10, 20, 50" />
    </SettingsPager>
    </dx:ASPxGridView>
<dx:ASPxPopupControl ID="wdsQuanLyPhanQuyen" HeaderStyle-Font-Bold="True" runat="server" HeaderImage="../Skins/style/IMG/icon/Delete.png" MinWidth="450px" HeaderText="Thông tin quyền" AllowResize="False" ClientInstanceName="popupControl" Height="320px" Modal="True" CloseAction="CloseButton" AllowDragging="True" PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" Theme="Aqua">
    <ContentCollection>
        <dx:PopupControlContentControl ID="PopupControlContentControl1" runat="server">
            <table class="OptionsTable" style="margin-top: 10px; margin-left: 20px;">
                <tr style="float: left; margin-bottom: 10px;">
                    <td style="width: 120px; vertical-align: top;">Mã quyền <span class="redLabel">(*)</span>: &nbsp;
                    </td>
                    <td style="width: 260px; vertical-align: top;">
                        <dx:ASPxTextBox ID="txtmaquyen" runat="server" Height="25px" Width="250px" ClientInstanceName="txtPopup">
                        </dx:ASPxTextBox>
                    </td>
                </tr>
                <tr style="float: left; margin-bottom: 10px;">
                    <td style="width: 120px; vertical-align: top;">Tên quyền<span class="redLabel">(*)</span>: &nbsp;
                    </td>
                    <td style="width: 260px; vertical-align: top;">
                        <dx:ASPxTextBox ID="txttenquyen" runat="server" Height="25px" Width="250px" ClientInstanceName="txtPopup">
                        </dx:ASPxTextBox>
                    </td>
                </tr>
              
                <tr style="float: left; margin-bottom: 10px;">
                    <td style="width: 120px; vertical-align: top;">Tài nguyên<span class="redLabel">(*)</span>: &nbsp;
                    </td>
                    <td style="width: 260px; vertical-align: top;">
                        <dx:ASPxComboBox runat="server" ID="cbotainguyen"
                            ValueField="pk_iTaiNguyenID" TextField="sTenTaiNguyen" EnableCallbackMode="true" IncrementalFilteringMode="StartsWith" Height="25px" Width="250px" RightToLeft="False" />
                    </td>
                </tr>
                <tr style="float: left; margin-bottom: 10px;">
                    <td style="width: 120px; vertical-align: top;">Menu<span class="redLabel">(*)</span>: &nbsp;
                    </td>
                    <td style="width: 260px; vertical-align: top;">
                        <dx:ASPxComboBox runat="server" ID="cbomneu"
                            ValueField="pk_iMenuID" TextField="sTenMenu" EnableCallbackMode="true" IncrementalFilteringMode="StartsWith" Height="25px" Width="250px" RightToLeft="False" />
                        
                    </td>
                </tr>
                <tr style="float: left; margin-bottom: 10px;">
                    <td style="width: 120px; vertical-align: top; margin-top: 10px;">Thao tác<span class="redLabel">(*)</span>: &nbsp;
                    </td>
                     <td style="width: 260px; vertical-align: top;">
                         <dx:ASPxCheckBoxList runat="server" ID="checkboxcha" ValueField="id"  TextField="name" RepeatColumns="4" Width="252px" RepeatLayout="Table" >
                                                                       
                                                                    </dx:ASPxCheckBoxList>
                         <dx:ASPxRadioButtonList runat="server" ValueField="id" TextField="name" Visible="False" ID="radibutomcha" RepeatColumns="4" Width="252px" RepeatLayout="Table" >
                           
                        </dx:ASPxRadioButtonList>
                    </td>
                     
                </tr>
            </table>
            <table style="border: none; float: right; margin-right: 20px; margin-bottom: 10px;">
                <tr>
                    <td>
                    <td style="float: left;">
                        <dx:ASPxButton ID="btnLuuLai" runat="server" AutoPostBack="False" Text="Lưu lại"  OnClick="LuuLai_Click">
                            <Image Url="../Skins/style/IMG/icon/Save.png" Width="16px" Height="16px" />
                        </dx:ASPxButton>
                          <dx:ASPxButton ID="btcapnhat" runat="server" AutoPostBack="False" Text="Lưu lại"  OnClick="CapNhat_Click">
                                 <Image Url="../Skins/style/IMG/icon/SaveEdit.png" Width="16px" Height="16px" />
                        </dx:ASPxButton>
                    </td>
                    <td style="float: left; margin-left: 10px;">
                        <dx:ASPxButton ID="btnDong" runat="server" AutoPostBack="False" ClientInstanceName="btnCancel" OnClick="bt_donglai" EncodeHtml="False"
                            Text="Đóng" Width="80px">
                            <ClientSideEvents Click="function(s, e) {popupControl.Hide();}" />
                             <Image Url="../Skins/style/IMG/icon/Close.png" Width="16px" Height="16px" />
                        </dx:ASPxButton>
                    </td>
                </tr>
            </table>
        </dx:PopupControlContentControl>
    </ContentCollection>
</dx:ASPxPopupControl>
